import React, { PureComponent } from 'react'
import { ImageBackground, StyleSheet, View, Image, Text } from 'react-native'
import { screen, system } from '../../common'
type Props = {
    info: Object,
}
type State = {
}
class NewPersonDiscountCouponItem extends PureComponent<Props, State>{
    render() {
        let info = this.props.info
        let price = info.price
        let useLimit = info.uselimit
        let startUseTime = info.startusetime
        let endUseTime = info.endusetime
        return (
            <View>
                <ImageBackground style={styles.backgroundImage} resizeMode={'stretch'} source={require('../../img/mine/redpacketTest.png')} >
                    <View style={styles.container}>
                        <View style={styles.leftStyle}>
                            <Text style={styles.titleStyle}>{price}元优惠券</Text>
                            <Text style={styles.subtitleStyle}>{useLimit}</Text>
                            <Text style={styles.limittimeStyle}>{startUseTime}-{endUseTime}</Text>
                        </View>
                        <View style={styles.rightStyle}>
                            <Text style={styles.symbolStyle}>¥ </Text>
                            <Text style={styles.priceStyle}>{price}</Text>
                            <Text style={styles.symbolStyle}>.00</Text>
                        </View>
                    </View>
                </ImageBackground>
                <View style={{ height: screen.height/180, backgroundColor: 'transparent' }}></View>
            </View>
        )
    }
}
const styles = StyleSheet.create({
    container: {
        flexDirection: 'row',
        // padding: 10,
        height: screen.height/7,
        width: screen.width*0.7,
        //marginLeft: 50,
    },
    backgroundImage: {
        height: screen.height/7,
        width: screen.width*0.7,
        //marginLeft: 70,
    },
    leftStyle: {
        height: screen.height/7,
        width: screen.width*0.46,
        flexDirection: 'column',
        justifyContent: 'center',
        // paddingLeft: 20,
        marginLeft:screen.width/20
    },
    titleStyle: {
        fontSize: 23,
        marginBottom: screen.height/300,
    },
    subtitleStyle: {
        fontSize: 18,
        marginBottom: screen.height/90,
    },
    limittimeStyle: {
        fontSize: 15,
        marginTop: screen.height/90,
    },
    rightStyle: {
        height: screen.height/7,
        width: screen.width*0.23,
        flexDirection: 'row',
        justifyContent: 'center',
        alignItems: 'center',
    },
    priceStyle: {
        fontSize: 40,
    },
    symbolStyle: {
        fontSize: 20,
    },



})
export default NewPersonDiscountCouponItem